package com.tyut.musicdreamer.service.user.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * 测试控制器
 */
@RestController
@RequestMapping("/api/test")
@Slf4j
public class TestController {

    /**
     * 简单测试接口
     */
    @GetMapping
    public Map<String, Object> test() {
        log.debug("接收到测试请求");
        Map<String, Object> result = new HashMap<>();
        result.put("success", true);
        result.put("message", "测试接口工作正常");
        result.put("timestamp", System.currentTimeMillis());
        return result;
    }

    /**
     * 测试路径映射
     */
    @GetMapping("/path")
    public Map<String, Object> testPath() {
        log.debug("接收到路径测试请求");
        Map<String, Object> result = new HashMap<>();
        result.put("success", true);
        result.put("message", "路径映射正常");
        result.put("path", "/api/test/path");
        result.put("timestamp", System.currentTimeMillis());
        return result;
    }
} 